import { NgModule, Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { ModalModule, PaginationModule, BsDropdownModule } from 'ngx-bootstrap';
import { WebUploaderModule, WebUploaderConfig, Options, OptionsPick, OptionsThumb } from 'ngx-webuploader';
import { FormsModule } from '@angular/forms';
import { HttpModule, JsonpModule } from '@angular/http';
import { AbpModule, ABP_HTTP_PROVIDER } from '@abp/abp.module';
import { ServiceProxyModule } from '@shared/service-proxies/service-proxy.module';
import { SharedModule } from '@shared/shared.module';
import { API_BASE_URL, ProductType } from '@shared/service-proxies/service-proxies';
import { AppConsts } from '@shared/AppConsts';
import { UEditorModule } from 'ngx-ueditor';
import { PromotionAddComponent } from './promotion-add/promotion-add.component';
import { PromotionComponent} from './promotion.component';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    HttpModule,
    JsonpModule,
    ModalModule,
    PaginationModule,
    BsDropdownModule,
    AbpModule,
    ServiceProxyModule,
    UEditorModule.forRoot({
      // 指定ueditor.js路径目录
      path: '../../assets/ueditor/',
      // 默认全局配置项
      options: {
        themePath: '../../assets/ueditor/themes/'
      }
    }),
    WebUploaderModule.forRoot(<WebUploaderConfig>{
      // 全局默认Options配置
      options: <Options>{
        swf: '../../assets/webuploader-0.1.5/Uploader.swf'
      },
      // webuploader的存储路径
      path: '../../assets/webuploader-0.1.5/',
      // 依赖库
      dependentLib: '../../assets/zepto.js'
    }),
    SharedModule,
    RouterModule.forChild([
      { path: '', component: PromotionComponent }
    ])
  ],
  declarations: [PromotionComponent,
    PromotionAddComponent
]
})
export class PromotionModule {

}
